//medicine_menu开头
$(function(){
	$(".right_ul li a").css("float","left");
	$(".right_ul li a").eq(0).css({"border":"none","paddingRight":0,"color":"#e55251"})
	$(".right_ul li:last>a").css("border","none");
	$(".right_ul li:last>span").css({"float":"left","margin":"0 -5px 0 5px","color":"#e54948"});
	$(".right_ul li:eq(4)>a").css({"color":"#cbaf82","font-weight":"800"})	
})

//二级菜单划出
$(".nav_ul2 li:eq(0)").hover(function(){
	$(".nav_ul1").css("display","block")
},function(){
	$(".nav_ul1").css("display","none")
})
//三级菜单
$(".nav_ul1 li").hover(function(){
	$(this).animate({"margin-left":"5px"},300);
	$(this).children("a").css({"color":"#e96875"});
},function(){
	$(this).animate({"margin-left":0},300);
	$(this).children("a").css({"color":"#f1f1f1"});
})

/*++++++++++++++++++++++++++++++放大镜++++++++++++++++++++++++++++*/
$("#etalage").zoom({
    zoom_area_width: 300,
    autoplay_interval :3000,
    small_thumbs : 6,
    autoplay : false,
    smallthumb_inactive_opacity: 0.7,
    thumb_image_width: 270,
    thumb_image_height: 300,
}); 
//规格样式
console.log($(".gg p:eq(2)"))
$(".gg p:eq(1)").click(function(){
	$(".gg p:eq(2)").css({"background":"none","color":"#e0e0e0","border-color":"#e0e0e0"})
	$(".gg p:eq(1)").css({"background":"url(../img/detail1/icon_detail.png) no-repeat 48px -582px","color":"#E72418","border-color":"#E72418"})
})
$(".gg p:eq(2)").click(function(){
	$(".gg p:eq(1)").css({"background":"none","color":"#e0e0e0","border-color":"#e0e0e0"})
	$(".gg p:eq(2)").css({"background":"url(../img/detail1/icon_detail.png) no-repeat 48px -582px","color":"#E72418","border-color":"#E72418"})
})

//物品加减
//给增加按钮添加事件
	$(".num_ul li:eq(0)").click(function() {
		var num = Number($(this).parent().siblings(".p3").find("input").val());
//		console.log(num)
		num += 1;
		$(this).parent().siblings(".p3").find("input").val(num)
	});
//给减按钮添加点击事件
	$(".num_ul li:eq(1)").click(function(){
		var num = Number($(this).parent().siblings(".p3").find("input").val());
		if(num > 1){ //商品数量减少不能少于1
			num -= 1;
			//将页面上显示的数量减1
			$(this).parent().siblings(".p3").find("input").val(num)
		}
	});















